package templa

import (
	"github.com/go-fuego/fuego/examples/full-app-gourmet/templa/components"
)

templ page(title string) {
	<!DOCTYPE html>
	<html lang="en">
		<head>
			@components.Head(title)
		</head>
		<body class="m-0 dark:bg-zinc-800 dark:text-white">
			<div
				id="errormessages"
				class="alert alert-danger fixed bottom-0 z-50 hidden w-screen items-center justify-between bg-red-500 p-2 text-center text-white"
				role="alert"
			>
				<h4 class="ml-4">An error occurred</h4>
				<button class="btn btn-red-bg" onclick="errormessage_off()">Close</button>
			</div>
			@NavBar()
			<main id="page" class="container mx-auto">
				{ children... }
			</main>
			@components.Footer()
			@components.Scripts()
		</body>
	</html>
}
